<!--
 * @Descripttion: 
 * @version: 
 * @Author: hzx
 * @Date: 2021-03-30 18:15:39
 * @LastEditors: hzx
 * @LastEditTime: 2021-03-31 15:13:12
-->
<template>
    <el-row class="tac">
        <el-col :span="3">
            <el-menu
                default-active="2"
                class="el-menu-vertical-demo"
                background-color="#545c64"
                text-color="#fff"
                active-text-color="#ffd04b"
            >
                <el-menu-item index="0">
                    <img class="logo" src="@/assets/logo.png" alt="" />
                </el-menu-item>
                <el-menu-item index="4" @click="goRouter('/addArticle')">
                    <i class="el-icon-setting"></i>
                    <span slot="title">文章发布</span>
                </el-menu-item>
                <el-menu-item index="3"  @click="goRouter('/ruleArt')">
                    <i class="el-icon-document"></i>
                    <span slot="title">文章管理</span>
                </el-menu-item>
                <el-menu-item index="2"  @click="goRouter('/ruleMes')">
                    <i class="el-icon-menu"></i>
                    <span slot="title">留言管理</span>
                </el-menu-item>
            </el-menu>
        </el-col>
        <el-col :span="21">
            <div class="header"></div>
            <div class="content">
                <router-view> </router-view>
            </div>
        </el-col>
    </el-row>
</template>

<script>
export default {
    components: {},
    date() {},
    methods: {
        goRouter(url) {
            this.$router.push(url);
        },
    },
};
</script>

<style lang="less" scoped>
& .tac {
    background: rgb(245, 245, 245);
    margin: 0;
    & .el-menu-vertical-demo {
        min-height: 760px;
    }
    & .logo {
        width: 75px;
        height: 40px;
    }

    & .header {
        background: rgb(255, 255, 255);
        height: 60px;
        border-bottom: 2px solid #ccc;
    }

    & .content {
        background: #fff;
        margin: 10px;
        min-height: 600px;
        padding: 10px;
    }
}
</style>